﻿<html>
	<head>
	<!DOCTYPE html >
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>MAGSI</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

	<link rel="stylesheet" href="../css/bootstrap.min.css" />
	<link rel="stylesheet" href="../css/main.css" />
	<link rel="stylesheet" href="../css/sl-slide.css" />
	<link rel="stylesheet" href="../css/font-awesome.css" />
    
    <link rel="stylesheet" href="css/ceGrid.css" />
	
	<script src="../js/login/modernizr-2.6.2-respond-1.1.0.min.js"></script>
	<link rel="shortcut icon" href="../imagenes/ico/vaquita.ico">
	</head>
	
	<body>  
  		<header class="navbar navbar-fixed-top">
    		 <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <a id="logo" class="pull-left" href="../index.php"></a>
                <div class="nav-collapse collapse pull-right">
                    <ul class="nav">
                         <li class="active"><a href="../index.php">Inicio</a></li> 
                         <li><a href="../gestFinca.php">Gestión de Finca</a></li>
                         <li><a href="../ .php">Administración Finca</a></li>
                         <li><a href="../ .php">Reporte General</a></li>            
                         <li class="login">
                            <a data-toggle="modal" href="#loginForm"><i class="icon-lock"></i></a>
                        </li>
                    </ul>        
                </div><!--/.nav-collapse -->
            </div>
        </div>
    </header>
    
    
	<section class="title">
    <div class="container">
      <div class="row-fluid">
        <div class="span6">
          <h1>Gestión de la Finca</h1>
        </div>
        <div class="span6">
          <ul class="breadcrumb pull-right">
            <li><a href="../index.php">Inicio</a> <span class="divider">/</span></li>
            <li><a href="#"></a> <span class="divider">Menú Principal MAGSI /</span></li>
            <li class="active">Gestión de la Finca</li>
          </ul>
        </div>
      </div>
    </div>
  </section>
  <!-- / .title -->  	
  

  <div id="DivGrilla" style="padding:25px 25px 250px 26px">
  <?php

$host = "localhost";
$usuario = "Magsi";
$clave = "Magsi";

require 'dg/ceSQL.php';
require 'dg/ceGrid.php';


$dbase = new ceMySQLAdap($host,$usuario, $clave,"magsi_db");

$dg = new ceDataGrid($dbase); 

$dg->setQuery("MA_In_IdFinca,MA_V_Nombre,MA_V_IdDueho","ma_af_finca");

$dg->allowFilters();

$dg->showCreateButton("href='Formularios/NuevaFinca.php'", ceDataGrid::TYPE_ONCLICK, 'Nueva finca');
$dg->setResultsPerPage(30);

$dg->setColumnHeader('MA_In_IdFinca', 'IdFinca');
$dg->setColumnHeader('MA_V_Nombre', 'Nombre');
$dg->setColumnHeader('MA_V_IdDueho', 'IdDueño');


$dg->addStandardControl(ceDataGrid::STDCTRL_EDIT, "href='mt02.php?id=%MA_In_IdFinca%'");
$dg->addStandardControl(ceDataGrid::STDCTRL_DELETE, "href='Acciones/EliminarFinca.php?id=%MA_In_IdFinca%'");

$dg->showReset("Refrescar");
$dg->printTable();
?>

</div>
  
  <footer id="footer">
    <div class="container">
        <div class="row-fluid">
            <div class="span5 cp">
                &copy; 2014 <a target="_blank" href="http://shapebootstrap.net/" title="Free Twitter Bootstrap WordPress Themes and HTML templates">Ministerio Agricultura y Ganadería</a>. Todos los Derechos Reservados.
            </div>
            <div class="span1">
                <a id="gototop" class="gototop pull-right" href="#"><i class="icon-angle-up"></i></a>
            </div>
            <!--/Goto Top-->
        </div>
    </div>
</footer>
	</body>
	
	
</html>